package com.usfuture.customComponent
{
	import fl.controls.Button;
	
	import flash.display.MovieClip;
	import flash.display.Sprite;
	
	public class ZoomButton extends Sprite
	{
		public static const ZOOM_IN:String = 'zoom_in';
		public static const ZOOM_OUT:String = 'zoom_out';
		
		private var type:String;
		
		public function ZoomButton(type:String)
		{
			super();
			this.type = type;
			this.useHandCursor = true;
			this.buttonMode = true;
			this.tabEnabled = false;
			updateDisplay(this.width,this.height);
		}
		
		private function updateDisplay(w:Number,h:Number):void {
			graphics.clear();
			graphics.lineStyle(1,0x000000,1);
			graphics.beginFill(0xFFFFFF,1);
			switch(type){
				case ZOOM_IN:
					graphics.drawCircle(5,5,5);
					graphics.moveTo(1,5);
					graphics.lineTo(9,5);
					graphics.endFill();
					break;
				case ZOOM_OUT:
					graphics.drawCircle(5,5,5);
					graphics.moveTo(1,5);
					graphics.lineTo(9,5);
					graphics.moveTo(5,1);
					graphics.lineTo(5,9);
					graphics.endFill();
					break;
				default:break;
			}

		}
	}
}